package a.f.n;

import a.c.ab;
import a.c.d;
import a.c.e;
import a.c.j;
import a.d.f;
import a.d.w;
import a.f.cd;
import a.f.o;

import java.util.Comparator;

public class m
  extends k
{
  public static boolean o;
  
  public m()
  {
    super(k.b_.a);
  }
  
  public m(k.b_ paramb_)
  {
    super(paramb_);
  }
  
  protected byte d(e parame)
  {
    throw new IllegalStateException("Should not reach");
  }
  
  public void a(e parame, j paramj)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    int i = parame.e() / 2;
    this.h = ((o)parame.g());
    try
    {
      int j = 0;
      d locald = parame.h();
      label86:
      label92:
      do
      {
        if (locald == null) {
          break;
        }
        e locale = locald.f();
        if ((!bool2) && (bool1)) {
          return;
        }
        if (!bool2) {
          if (j < i)
          {
            b = 2;
            if (bool2) {
              break label92;
            }
            if (!bool1) {
              break label86;
            }
          }
        }
        byte b = 0;
        int k = a(b);
        paramj.a(locale, k);
        j++;
        locald = locald.i();
      } while (!bool1);
      if (bool2) {}
    }
    finally
    {
      this.h = null;
    }
  }
  
  protected v a(e parame, byte paramByte)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    v localv = a(parame);
    if (!bool2)
    {
      if (parame.e() == 0) {
        a(parame, paramByte, localv);
      }
    }
    else {
      return localv;
    }
    f localf1 = new f(localv.d());
    f localf2 = new f(localv.d() + this.g + this.g);
    f localf3 = new f(localv.g());
    f localf4 = new f(localv.h());
    f localf5 = new f(localv.b() - this.g / 2.0D);
    f localf6 = new f(localv.b() + this.g / 2.0D);
    cd localcd = c(parame);
    if ((bool2) || (!localcd.e()))
    {
      if (bool2) {
        break label190;
      }
      if (!localcd.d()) {}
    }
    else
    {
      localf3.a(this.g);
    }
    if (localcd.f()) {
      label190:
      localf4.a(-this.g);
    }
    db.c_ localc_ = new db.c_(new w(localv.b(), localv.d() + this.g));
    int i = parame.e() / 2;
    int j = parame.e() - i;
    int k = i / 2;
    int m = j / 2;
    ab localab1 = new ab();
    ab localab2 = new ab();
    ab localab3 = new ab();
    ab localab4 = new ab();
    int n = 0;
    Object localObject1 = parame.n();
    label426:
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      if (!bool2)
      {
        if (n < i)
        {
          if (!bool2)
          {
            if (n < k)
            {
              localab1.add(localObject2);
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label426;
              }
            }
            localab2.add(localObject2);
          }
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label426;
          }
        }
        if (bool2) {}
      }
      else if (n < i + m)
      {
        localab3.add(localObject2);
        if (bool2) {
          continue;
        }
        if (!bool1) {
          break label426;
        }
      }
      localab4.add(localObject2);
      n++;
      ((a.c.m)localObject1).f();
    } while (!bool1);
    localObject1 = null;
    Object localObject2 = localab2.l();
    Object localObject3;
    Object localObject5;
    Object localObject6;
    Object localObject8;
    do
    {
      if (!((a.c.m)localObject2).e()) {
        break;
      }
      localObject3 = ((a.c.m)localObject2).a();
      localObject5 = b(((d)localObject3).f());
      localObject6 = a((d)localObject3, (v)localObject5);
      ((db.a_)localObject6).a(localc_);
      ((v)localObject5).a(localf1);
      localObject8 = ((db.a_)localObject6).c(1);
      ((v)localObject5).n((f)localObject8);
      ((v)localObject5).d(localf3, this.g);
      ((v)localObject5).e(localf3);
      ((db.a_)localObject6).g(1);
      ((db.a_)localObject6).e(0);
      ((db.a_)localObject6).e();
      localObject1 = localObject5;
      ((v)localObject5).l();
      localv.a((v)localObject5);
      ((a.c.m)localObject2).f();
      if (bool2) {
        break label859;
      }
      if (bool1) {
        break label852;
      }
    } while (!bool1);
    localObject2 = null;
    f localf7;
    label842:
    label852:
    label859:
    Object localObject4;
    Object localObject7;
    if (!bool2)
    {
      localObject3 = localab1.l();
      do
      {
        if (!((a.c.m)localObject3).e()) {
          break;
        }
        localObject5 = ((a.c.m)localObject3).a();
        localObject6 = b(((d)localObject5).f());
        localObject8 = a((d)localObject5, (v)localObject6);
        ((db.a_)localObject8).a(localc_);
        ((v)localObject6).a(localf1);
        localf7 = ((db.a_)localObject8).c(1);
        ((v)localObject6).n(localf7);
        ((v)localObject6).b(localf4, this.g);
        ((v)localObject6).g(localf4);
        ((db.a_)localObject8).g(1);
        ((db.a_)localObject8).e(0);
        ((db.a_)localObject8).e();
        localObject2 = localObject6;
        ((v)localObject6).l();
        localv.a((v)localObject6);
        ((a.c.m)localObject3).f();
        if ((!bool2) && (bool1)) {
          break label842;
        }
      } while (!bool1);
      if (!bool2)
      {
        if (((bool2) || (localObject1 != null)) && ((bool2) || (localObject2 != null)) && ((bool2) || (localObject2 != localObject1)))
        {
          double d1 = ((v)localObject2).g();
          double d3 = ((v)localObject1).h();
          if (d1 < d3)
          {
            localf7 = new f(d1, d3, localf1.d() + this.g);
            localv.k(localf7);
          }
        }
        localObject1 = null;
        localObject2 = localab4.l();
        do
        {
          if (!((a.c.m)localObject2).e()) {
            break;
          }
          localObject4 = ((a.c.m)localObject2).a();
          localObject5 = b(((d)localObject4).f());
          localObject7 = a((d)localObject4, (v)localObject5);
          ((db.a_)localObject7).a(localc_);
          ((v)localObject5).d(localf2);
          localObject8 = ((db.a_)localObject7).b(1);
          ((v)localObject5).n((f)localObject8);
          ((v)localObject5).d(localf5, this.g);
          ((v)localObject5).e(localf5);
          ((db.a_)localObject7).f(1);
          ((db.a_)localObject7).e(0);
          ((db.a_)localObject7).e();
          localObject1 = localObject5;
          ((v)localObject5).l();
          localv.a((v)localObject5);
          ((a.c.m)localObject2).f();
        } while (!bool1);
        localObject2 = null;
      }
    }
    else
    {
      localObject4 = localab3.l();
      do
      {
        if (!((a.c.m)localObject4).e()) {
          break;
        }
        localObject5 = ((a.c.m)localObject4).a();
        localObject7 = b(((d)localObject5).f());
        localObject8 = a((d)localObject5, (v)localObject7);
        ((db.a_)localObject8).a(localc_);
        ((v)localObject7).d(localf2);
        localf7 = ((db.a_)localObject8).b(1);
        ((v)localObject7).n(localf7);
        ((v)localObject7).b(localf6, this.g);
        ((v)localObject7).g(localf6);
        ((db.a_)localObject8).f(1);
        ((db.a_)localObject8).e(0);
        ((db.a_)localObject8).e();
        localObject2 = localObject7;
        ((v)localObject7).l();
        if (bool2) {
          break label1239;
        }
        localv.a((v)localObject7);
        n--;
        ((a.c.m)localObject4).f();
        if (bool1) {
          return localv;
        }
      } while (!bool1);
      if (bool2) {
        break label1239;
      }
    }
    if (((bool2) || (localObject1 != null)) && ((bool2) || (localObject2 != null)) && ((bool2) || (localObject2 != localObject1)))
    {
      double d2 = ((v)localObject2).g();
      double d4 = ((v)localObject1).h();
      if (d2 < d4)
      {
        localf7 = new f(d2, d4, localf1.d() + this.g);
        localv.k(localf7);
      }
    }
    a(parame, paramByte, localv);
    label1239:
    return localv;
  }
  
  private void a(e parame, byte paramByte, v paramv)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    db.b_ localb_ = a(parame, paramv);
    paramv.l();
    if (parame.i() == null) {
      return;
    }
    cd localcd = c(parame);
    if (!bool2)
    {
      switch (paramByte)
      {
      case 0: 
        if (!bool2) {}
        switch (localcd.b())
        {
        case 1: 
        case 3: 
        case 5: 
        case 6: 
        case 7: 
        default: 
          if (bool2) {
            break label199;
          }
          if (!bool1) {
            break;
          }
        case 4: 
          localb_.b(0, true);
          if (bool2) {
            break label199;
          }
          if (!bool1) {
            break;
          }
        case 8: 
          localb_.c(0, true);
          if (bool2) {
            break label199;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          localb_.e(0, true);
          localb_.b(0, true);
        }
        localb_.f(1);
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 1: 
        if (!bool2) {}
        switch (localcd.b())
        {
        case 1: 
        case 3: 
        case 5: 
        case 6: 
        case 7: 
        default: 
          localb_.d(1, true);
          if (bool2) {
            break label359;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          localb_.e(0, true);
          localb_.b(0, true);
          localb_.d(1, true);
          if (bool2) {
            break label359;
          }
          if (!bool1) {
            break;
          }
        case 4: 
          localb_.b(0, true);
          localb_.d(1, true);
          if (bool2) {
            break label359;
          }
          if (!bool1) {
            break;
          }
        case 8: 
          localb_.c(0, true);
          localb_.d(1, true);
        }
        localb_.d(1);
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 2: 
        if (!bool2) {}
        switch (localcd.b())
        {
        case 1: 
        case 3: 
        case 5: 
        case 6: 
        case 7: 
        default: 
          localb_.d(1, true);
          localb_.c(1, true);
          if (bool2) {
            break label547;
          }
          if (!bool1) {
            break;
          }
        case 4: 
          localb_.b(0, true);
          localb_.d(1, true);
          localb_.b(1, true);
          if (bool2) {
            break label547;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          localb_.e(0, true);
          localb_.b(0, true);
          localb_.d(1, true);
          localb_.b(1, true);
          if (bool2) {
            break label547;
          }
          if (!bool1) {
            break;
          }
        case 8: 
          localb_.c(0, true);
          localb_.d(1, true);
          localb_.c(1, true);
        }
        localb_.g(1);
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 3: 
        label199:
        label359:
        if (!bool2) {}
        label547:
        switch (localcd.b())
        {
        case 1: 
        case 3: 
        case 5: 
        case 6: 
        case 7: 
        default: 
          localb_.d(1, true);
          if (bool2) {
            break label700;
          }
          if (!bool1) {
            break;
          }
        case 4: 
          localb_.b(0, true);
          localb_.d(1, true);
          if (bool2) {
            break label700;
          }
          if (!bool1) {
            break;
          }
        case 2: 
          localb_.e(0, true);
          localb_.b(0, true);
          localb_.d(1, true);
          if (bool2) {
            break label700;
          }
          if (!bool1) {
            break;
          }
        case 8: 
          localb_.c(0, true);
          localb_.d(1, true);
        }
        localb_.e(1);
        label700:
        break;
      }
      paramv.l();
    }
  }
  
  public Comparator c()
  {
    return null;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.n.m

 * JD-Core Version:    0.7.0.1

 */